package com.ruoyi.ctcx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ctcx.mapper.TbInsuranceContractPremiumPlanMapper;
import com.ruoyi.ctcx.domain.TbInsuranceContractPremiumPlan;
import com.ruoyi.ctcx.service.ITbInsuranceContractPremiumPlanService;

/**
 * 保险合同回款计划Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-21
 */
@Service
public class TbInsuranceContractPremiumPlanServiceImpl implements ITbInsuranceContractPremiumPlanService 
{
    @Autowired
    private TbInsuranceContractPremiumPlanMapper tbInsuranceContractPremiumPlanMapper;

    /**
     * 查询保险合同回款计划
     * 
     * @param id 保险合同回款计划主键
     * @return 保险合同回款计划
     */
    @Override
    public TbInsuranceContractPremiumPlan selectTbInsuranceContractPremiumPlanById(Long id)
    {
        return tbInsuranceContractPremiumPlanMapper.selectTbInsuranceContractPremiumPlanById(id);
    }

    /**
     * 查询保险合同回款计划列表
     * 
     * @param tbInsuranceContractPremiumPlan 保险合同回款计划
     * @return 保险合同回款计划
     */
    @Override
    public List<TbInsuranceContractPremiumPlan> selectTbInsuranceContractPremiumPlanList(TbInsuranceContractPremiumPlan tbInsuranceContractPremiumPlan)
    {
        return tbInsuranceContractPremiumPlanMapper.selectTbInsuranceContractPremiumPlanList(tbInsuranceContractPremiumPlan);
    }

    /**
     * 新增保险合同回款计划
     * 
     * @param tbInsuranceContractPremiumPlan 保险合同回款计划
     * @return 结果
     */
    @Override
    public int insertTbInsuranceContractPremiumPlan(TbInsuranceContractPremiumPlan tbInsuranceContractPremiumPlan)
    {
        tbInsuranceContractPremiumPlan.setCreateTime(DateUtils.getNowDate());
        return tbInsuranceContractPremiumPlanMapper.insertTbInsuranceContractPremiumPlan(tbInsuranceContractPremiumPlan);
    }

    /**
     * 修改保险合同回款计划
     * 
     * @param tbInsuranceContractPremiumPlan 保险合同回款计划
     * @return 结果
     */
    @Override
    public int updateTbInsuranceContractPremiumPlan(TbInsuranceContractPremiumPlan tbInsuranceContractPremiumPlan)
    {
        tbInsuranceContractPremiumPlan.setUpdateTime(DateUtils.getNowDate());
        return tbInsuranceContractPremiumPlanMapper.updateTbInsuranceContractPremiumPlan(tbInsuranceContractPremiumPlan);
    }

    /**
     * 批量删除保险合同回款计划
     * 
     * @param ids 需要删除的保险合同回款计划主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceContractPremiumPlanByIds(Long[] ids)
    {
        return tbInsuranceContractPremiumPlanMapper.deleteTbInsuranceContractPremiumPlanByIds(ids);
    }

    /**
     * 删除保险合同回款计划信息
     * 
     * @param id 保险合同回款计划主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceContractPremiumPlanById(Long id)
    {
        return tbInsuranceContractPremiumPlanMapper.deleteTbInsuranceContractPremiumPlanById(id);
    }
}
